home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / cap / include / interp.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  9.5 KB  |  472 lines

  1. /*
  2.  * Copyright 1991, 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. #define MALLOCWORDS    1024
  19. #define NONDATASIZE    2
  20.  
  21. /*
  22.  * Type definitions
  23.  */
  24.  
  25. struct element {
  26.     void (*func)();
  27.     struct element *next;
  28. };
  29. typedef struct element element_t;
  30.  
  31. struct float_element {
  32.     element_t junk;
  33.     float arg[300];
  34. };
  35. typedef struct float_element float_element_t;
  36.  
  37. struct int_element {
  38.     element_t junk;
  39.     int arg[300];
  40. };
  41. typedef struct int_element int_element_t;
  42.  
  43. /*
  44.  * Function declarations
  45.  */
  46.  
  47. int getgrouptype(void);
  48. void grouptype(int type);
  49. void interpinit(int argc, char** argv);
  50. void getbounds(float* Xmin,float* Xmax,float* Ymin,float* Ymax,float* Zmin,float* Zmax);
  51. element_t* getinterpobj(char* filename);
  52. void drawinterpobj(element_t* obj);
  53. void setbreakfunction(void(*func)());
  54. void sizeofimage(char* name, int* xsize, int* ysize);
  55. unsigned long *readimagedata(char* name);
  56. void writeimagedata(char* name,unsigned long* lbuf,int xsize,int ysize);
  57.  
  58. /*
  59.  *  Generic vertex command modes
  60.  */
  61.  
  62. #define GRP_POINT 0
  63. #define GRP_LINE 1
  64. #define GRP_CLOSEDLINE 2
  65. #define GRP_POLYGON 3
  66. #define GRP_TMESH 4
  67. #define GRP_HOLLOWPOLY 5
  68. #define GRP_TEXPOLY 6
  69. #define GRP_TEXTMESH 7
  70. #define GRP_SHOWDECOMP 8
  71.  
  72. /*
  73.  *  Command numbers
  74.  */
  75. #define ADDTOPUP 1
  76. #define ARC 2
  77. #define ARCF 3
  78. #define ARCFI 4
  79. #define ARCFS 5
  80. #define ARCI 6
  81. #define ARCS 7
  82. #define ATTACHCURSOR 8
  83. #define BACKBUFFER 9
  84. #define BACKFACE 10
  85. #define BBOX2 11
  86. #define BBOX2I 12
  87. #define BBOX2S 13
  88. #define BGNCLOSEDLINE 14
  89. #define BGNLINE 15
  90. #define BGNPOINT 16
  91. #define BGNPOLYGON 17
  92. #define BGNTMESH 18
  93. #define BLANKSCREEN 19
  94. #define BLANKTIME 20
  95. #define BLENDFUNCTION 21
  96. #define BLINK 22
  97. #define C3F 23
  98. #define C3I 24
  99. #define C3S 25
  100. #define C4F 26
  101. #define C4I 27
  102. #define C4S 28
  103. #define CALLOBJ 29
  104. #define CHARSTR 30
  105. #define CHUNKSIZE 31
  106. #define CIRC 32
  107. #define CIRCF 33
  108. #define CIRCFI 34
  109. #define CIRCFS 35
  110. #define CIRCI 36
  111. #define CIRCS 37
  112. #define CLEAR 38
  113. #define CLEARHITCODE 39
  114. #define CLKOFF 40
  115. #define CLKON 41
  116. #define CLOSEOBJ 42
  117. #define CMODE 43
  118. #define CMOV 44
  119. #define CMOV2 45
  120. #define CMOV2I 46
  121. #define CMOV2S 47
  122. #define CMOVI 48
  123. #define CMOVS 49
  124. #define COLOR 50
  125. #define COMPACTIFY 51
  126. #define CONCAVE 52
  127. #define CPACK 53
  128. #define CRV 54
  129. #define CRVN 55
  130. #define CURORIGIN 56
  131. #define CURSOFF 57
  132. #define CURSON 58
  133. #define CURSTYPE 59
  134. #define CURVEBASIS 60
  135. #define CURVEIT 61
  136. #define CURVEPRECISION 62
  137. #define CYCLEMAP 63
  138. #define CZCLEAR 64
  139. #define DBTEXT 65
  140. #define DEFBASIS 66
  141. #define DEFCURSOR 67
  142. #define DEFLINESTYLE 68
  143. #define DEFPATTERN 69
  144. #define DEFRASTERFONT 70
  145. #define DELOBJ 71
  146. #define DELTAG 72
  147. #define DEPTHCUE 73
  148. #define DEVPORT 74
  149. #define DOUBLEBUFFER 75
  150. #define DRAW 76
  151. #define DRAW2 77
  152. #define DRAW2I 78
  153. #define DRAW2S 79
  154. #define DRAWI 80
  155. #define DRAWMODE 81
  156. #define DRAWS 82
  157. #define EDITOBJ 83
  158. #define ENDCLOSEDLINE 84
  159. #define ENDFULLSCRN 85
  160. #define ENDLINE 86
  161. #define ENDPOINT 87
  162. #define ENDPOLYGON 88
  163. #define ENDTMESH 89
  164. #define FEEDBACK 90
  165. #define FINISH 91
  166. #define FONT 92
  167. #define FOREGROUND 93
  168. #define FREEPUP 94
  169. #define FRONTBUFFER 95
  170. #define FUDGE 96
  171. #define FULLSCRN 97
  172. #define GAMMARAMP 98
  173. #define GBEGIN 99
  174. #define GCONFIG 100
  175. #define GETCPOS 101
  176. #define GETCURSOR 102
  177. #define GETDEPTH 103
  178. #define GETDEV 104
  179. #define GETGPOS 105
  180. #define GETMATRIX 106
  181. #define GETMCOLOR 107
  182. #define GETORIGIN 108
  183. #define GETPORT 109
  184. #define GETSCRMASK 110
  185. #define GETSIZE 111
  186. #define GETTP 112
  187. #define GETVIEWPORT 113
  188. #define GEWRITE 114
  189. #define GEXIT 115
  190. #define GFLUSH 116
  191. #define GINIT 117
  192. #define GLCOMPAT 118
  193. #define GRESET 119
  194. #define GSELECT 123
  195. #define GSYNC 124
  196. #define IMAKEBACKGROUND 125
  197. #define INITNAMES 126
  198. #define KEEPASPECT 127
  199. #define LAMPOFF 128
  200. #define LAMPON 129
  201. #define LINEWIDTH 130
  202. #define LMBIND 131
  203. #define LMDEF 132
  204. #define LOADMATRIX 133
  205. #define LOADNAME 134
  206. #define LOOKAT 135
  207. #define LRECTWRITE 136
  208. #define LRGBRANGE 137
  209. #define LSBACKUP 138
  210. #define LSETDEPTH 139
  211. #define LSHADERANGE 140
  212. #define LSREPEAT 141
  213. #define MAKEOBJ 142
  214. #define MAKETAG 143
  215. #define MAPCOLOR 144
  216. #define MAPW 145
  217. #define MAPW2 146
  218. #define MAXSIZE 147
  219. #define MINSIZE 148
  220. #define MMODE 149
  221. #define MOVE 150
  222. #define MOVE2 151
  223. #define MOVE2I 152
  224. #define MOVE2S 153
  225. #define MOVEI 154
  226. #define MOVES 155
  227. #define MULTIMAP 156
  228. #define MULTMATRIX 157
  229. #define N3F 158
  230. #define NEWTAG 159
  231. #define NOBORDER 160
  232. #define NOISE 161
  233. #define NOPORT 162
  234. #define NORMAL 163
  235. #define OBJDELETE 164
  236. #define OBJINSERT 165
  237. #define OBJREPLACE 166
  238. #define ONEMAP 167
  239. #define ORTHO 168
  240. #define ORTHO2 169
  241. #define OVERLAY 170
  242. #define PAGEWRITEMASK 171
  243. #define PASSTHROUGH 172
  244. #define PATCH 173
  245. #define PATCHBASIS 174
  246. #define PATCHCURVES 175
  247. #define PATCHPRECISION 176
  248. #define PCLOS 177
  249. #define PDR 178
  250. #define PDR2 179
  251. #define PDR2I 180
  252. #define PDR2S 181
  253. #define PDRI 182
  254. #define PDRS 183
  255. #define PERSPECTIVE 184
  256. #define PICK 185
  257. #define PICKSIZE 186
  258. #define PMV 187
  259. #define PMV2 188
  260. #define PMV2I 189
  261. #define PMV2S 190
  262. #define PMVI 191
  263. #define PMVS 192
  264. #define PNT 193
  265. #define PNT2 194
  266. #define PNT2I 195
  267. #define PNT2S 196
  268. #define PNTI 197
  269. #define PNTS 198
  270. #define POLARVIEW 199
  271. #define POLF 200
  272. #define POLF2 201
  273. #define POLF2I 202
  274. #define POLF2S 203
  275. #define POLFI 204
  276. #define POLFS 205
  277. #define POLY 206
  278. #define POLY2 207
  279. #define POLY2I 208
  280. #define POLY2S 209
  281. #define POLYI 210
  282. #define POLYS 211
  283. #define POPATTRIBUTES 212
  284. #define POPMATRIX 213
  285. #define POPNAME 214
  286. #define POPVIEWPORT 215
  287. #define PREFPOSITION 216
  288. #define PREFSIZE 217
  289. #define PUSHATTRIBUTES 218
  290. #define PUSHMATRIX 219
  291. #define PUSHNAME 220
  292. #define PUSHVIEWPORT 221
  293. #define QDEVICE 222
  294. #define QENTER 223
  295. #define QRESET 224
  296. #define RCRV 225
  297. #define RCRVN 226
  298. #define RDR 227
  299. #define RDR2 228
  300. #define RDR2I 229
  301. #define RDR2S 230
  302. #define RDRI 231
  303. #define RDRS 232
  304. #define READSOURCE 233
  305. #define RECT 234
  306. #define RECTCOPY 235
  307. #define RECTF 236
  308. #define RECTFI 237
  309. #define RECTFS 238
  310. #define RECTI 239
  311. #define RECTS 240
  312. #define RECTWRITE 241
  313. #define RECTZOOM 242
  314. #define RESETLS 243
  315. #define RESHAPEVIEWPORT 244
  316. #define RGBCOLOR 245
  317. #define RGBCURSOR 246
  318. #define RGBMODE 247
  319. #define RGBRANGE 248
  320. #define RGBWRITEMASK 249
  321. #define RINGBELL 250
  322. #define RMV 251
  323. #define RMV2 252
  324. #define RMV2I 253
  325. #define RMV2S 254
  326. #define RMVI 255
  327. #define RMVS 256
  328. #define ROT 257
  329. #define ROTATE 258
  330. #define RPATCH 259
  331. #define RPDR 260
  332. #define RPDR2 261
  333. #define RPDR2I 262
  334. #define RPDR2S 263
  335. #define RPDRI 264
  336. #define RPDRS 265
  337. #define RPMV 266
  338. #define RPMV2 267
  339. #define RPMV2I 268
  340. #define RPMV2S 269
  341. #define RPMVI 270
  342. #define RPMVS 271
  343. #define SCALE 272
  344. #define SCREENSPACE 273
  345. #define SCRMASK 274
  346. #define SETBELL 275
  347. #define SETCURSOR 276
  348. #define SETDBLIGHTS 277
  349. #define SETDEPTH 278
  350. #define SETLINESTYLE 279
  351. #define SETMAP 280
  352. #define SETMONITOR 281
  353. #define SETPATTERN 282
  354. #define SETSHADE 283
  355. #define SETVALUATOR 284
  356. #define SETVIDEO 285
  357. #define SHADEMODEL 286
  358. #define SHADERANGE 287
  359. #define SINGLEBUFFER 288
  360. #define LINESMOOTH 289
  361. #define SPCLOS 290
  362. #define SPLF 291
  363. #define SPLF2 292
  364. #define SPLF2I 293
  365. #define SPLF2S 294
  366. #define SPLFI 295
  367. #define SPLFS 296
  368. #define STEPUNIT 297
  369. #define SWAPBUFFERS 298
  370. #define SWAPINTERVAL 299
  371. #define SWAPTMESH 300
  372. #define TEXTINIT 301
  373. #define TEXTWRITEMASK 302
  374. #define TIE 303
  375. #define TPOFF 304
  376. #define TPON 305
  377. #define TRANSLATE 306
  378. #define UNDERLAY 307
  379. #define UNQDEVICE 308
  380. #define V2D 309
  381. #define V2F 310
  382. #define V2I 311
  383. #define V2S 312
  384. #define V3D 313
  385. #define V3F 314
  386. #define V3I 315
  387. #define V3S 316
  388. #define V4D 317
  389. #define V4F 318
  390. #define V4I 319
  391. #define V4S 320
  392. #define VIEWPORT 321
  393. /*
  394. #define WINCLOSE 322
  395. */
  396. #define WINCONSTRAINTS 323
  397. #define WINDOW 324
  398. #define WINMOVE 325
  399. #define WINPOP 326
  400. #define WINPOSITION 327
  401. #define WINPUSH 328
  402. #define WINSET 329
  403. #define WINTITLE 330
  404. #define WMPACK 331
  405. #define WRITEMASK 332
  406. #define WRITEPIXELS 333
  407. #define WRITERGB 334
  408. #define XFPT 335
  409. #define XFPT2 336
  410. #define XFPT2I 337
  411. #define XFPT2S 338
  412. #define XFPT4 339
  413. #define XFPT4I 340
  414. #define XFPT4S 341
  415. #define XFPTI 342
  416. #define XFPTS 343
  417. #define ZBUFFER 344
  418. #define ZCLEAR 345
  419. #define ZDRAW 346
  420. #define ZFUNCTION 347
  421. #define ZSOURCE 348
  422. #define ZWRITEMASK 349
  423. #define BGNGROUP 350
  424. #define ENDGROUP 351
  425. #define GROUPTYPE 352
  426. #define RN3F 353
  427. #define FRONTFACE 354
  428. #define SUBPIXEL 355
  429. #define PNTSMOOTH 356
  430. #define HOLLOWCOLOR 357
  431. #define HOLLOWWIDTH 358
  432. #define SBOX 360
  433. #define SBOXF 361
  434. #define T2F 362
  435. #define SCRSUBDIVIDE 363
  436. #define LOGICOP 364
  437.  
  438. #define TEXFOGVERTEX 366
  439. #define FGINIT 367
  440. #define TEXDEF 368
  441. #define TEXBIND 369
  442. #define TEVDEF 370
  443. #define TEVBIND 371
  444. #define TEXCONTOUR 372
  445. #define TEXSCALE 373
  446. #define COLORF 374
  447. #define LMCOLOR 375
  448. #define ACBUF 377
  449. #define ACSIZE 378
  450. #define AFUNCTION 379
  451. #define BGNQSTRIP 380
  452. #define ENDQSTRIP 381
  453. #define CLIPPLANE 382
  454. #define FOGVERTEX 383
  455. #define GETSCRBOX 384
  456. #define MSWAPBUFFERS 385
  457. #define NMODE 386
  458. #define PIXMODE 387
  459. #define POLYMODE 388
  460. #define POLYSMOOTH 389
  461. #define SCLEAR 390
  462. #define SCRBOX 391
  463. #define STENCIL 392
  464. #define STENSIZE 393
  465. #define SWRITEMASK 394
  466. #define TEXDEF2D TEXDEF
  467. #define TEXGEN 395
  468. #define POLYIMAGE 396
  469. #define PNTSIZE 397
  470. #define BOX 398
  471. #define DISPLACEPOLYGON 399
  472.